//
//  UIBaseRefreshView.h
//  Qianbao
//
//  Created by zhangtie on 13-8-28.
//  Copyright (c) 2013年 qianwang365. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SRRefreshView.h"
#import "RefreshCell.h"

typedef enum _CELLSTATUS
{
    CELLSTATUS_NORMAL   = 0,
    CELLSTATUS_SELECTED,
}CELLSTATUS;


@interface QBCellSelectedState : NSObject

@property(nonatomic, assign)CELLSTATUS status;

@end

@class UIBaseRefreshView;
@protocol BaseRefreshViewDelegate <NSObject>

@optional
- (void)loadMore;

- (void)refreshData;

//新增
- (void)refreshData:(UIBaseRefreshView*)sender;

- (void)loadMore:(UIBaseRefreshView*)sender;

#if TEST_PUSH_VC
- (void)testEgg;
#endif

- (Class)getCellClass;

//tableview的selectedrow事件
- (void)didSelectedRowWithData:(QBCellSelectedState*)data;

- (void)didSelectedBtnAction:(QBCellSelectedState*)data;

@end

@interface UIBaseRefreshView : UIView<RefreshCellDelegate, SRRefreshDelegate, UIScrollViewDelegate, BaseRefreshViewDelegate>
{
    SRRefreshView       *_headRefreshView;
    RefreshCell         *_footRefreshView;
    UIScrollView        *_mainList;
    id<BaseRefreshViewDelegate>                  _delegate;
}

@property(nonatomic, retain)SRRefreshView       *headRefreshView;
@property(nonatomic, retain)RefreshCell         *footRefreshView;
@property(nonatomic, retain)UIScrollView        *mainList;
@property(nonatomic, assign)id<BaseRefreshViewDelegate> delegate;

- (void)loadMore;
- (void)refreshData;

- (void)showHeader:(BOOL)bshow;
- (void)showFooter:(BOOL)bshow;
- (void)endFooterLoadState;
- (void)endHeaderRefreshState;

@end
